package com.molichuxing.services.infrastructure.service;


import com.molichuxing.framework.dto.Paged;
import com.molichuxing.framework.service.RootService;
import com.molichuxing.services.infrastructure.dto.request.create.OrderDealerCreateDto;
import com.molichuxing.services.infrastructure.dto.response.OrderDealerDto;
import com.molichuxing.services.infrastructure.dto.response.OrderDealerDetailBasicDto;
import com.molichuxing.services.property.OrderRequestTypeEnum;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 经销商订单表 服务类
 * </p>
 *
 * @author renzhengyu
 * @since 2019-08-12
 */
public interface OrderDealerService  extends RootService {

    /**
     * 获取有关类型的采购单列表
     * Map<String,Object> params
     * key：orderType 订单类型
     * key：orderCode 订单号
     * key：dealerId 经销商id
     * key：startTime 创建开始时间
     * key：endTime 创建结束时间
     * @param pageNum 当前页
     * @param pageSize 每页条数
     * @param requestType 请求类型
     * @return
     */
    public Paged<OrderDealerDto> getOrderDealerList(Map<String,Object> params, Integer pageNum, Integer pageSize ,OrderRequestTypeEnum requestType);


    /**
     * 查询采购单基础信息详情
     * @param orderCode
     * @return
     */
    public OrderDealerDetailBasicDto getDetailBasic(Long orderCode);


    /**
     * 查询采购单当前状态
     * @param orderCode
     * @return
     */
    public Integer getOrderDealerStatus(Long orderCode);


    /**
     * 新增采购单
     * @param orderDealerCreateDto
     * @return
     */
    public Integer createOrderDealer(OrderDealerCreateDto orderDealerCreateDto);

    /**
     * 合同编号验重
     * @param contractNo
     * @return
     */
    public Boolean getContractNo(String contractNo);

    /**
     * 修改采购单状态
     * @param orderCode
     * @param orderStatus
     * @return
     */
    public Boolean modifyOrderStatus(Long orderCode ,Integer orderStatus);

    /**
     * 获取车辆数
     * @param orderCode
     * @return
     */
    public Integer getCarCount(Long orderCode);

    /**
     * 查询经销商下所有订单
     * @param dealerId
     * @return
     */
    public List<Long> getOrderCodeByDealerId(Integer dealerId);
}
